package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SensorAnomalyMapper;
import com.ruoyi.system.domain.SensorAnomaly;
import com.ruoyi.system.service.ISensorAnomalyService;

/**
 * 传感器异常Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-11-15
 */
@Service
public class SensorAnomalyServiceImpl implements ISensorAnomalyService 
{
    @Autowired
    private SensorAnomalyMapper sensorAnomalyMapper;

    /**
     * 查询传感器异常
     * 
     * @param id 传感器异常主键
     * @return 传感器异常
     */
    @Override
    public SensorAnomaly selectSensorAnomalyById(Integer id)
    {
        return sensorAnomalyMapper.selectSensorAnomalyById(id);
    }

    /**
     * 查询传感器异常列表
     * 
     * @param sensorAnomaly 传感器异常
     * @return 传感器异常
     */
    @Override
    public List<SensorAnomaly> selectSensorAnomalyList(SensorAnomaly sensorAnomaly)
    {
        return sensorAnomalyMapper.selectSensorAnomalyList(sensorAnomaly);
    }

    /**
     * 新增传感器异常
     * 
     * @param sensorAnomaly 传感器异常
     * @return 结果
     */
    @Override
    public int insertSensorAnomaly(SensorAnomaly sensorAnomaly)
    {
        return sensorAnomalyMapper.insertSensorAnomaly(sensorAnomaly);
    }

    /**
     * 修改传感器异常
     * 
     * @param sensorAnomaly 传感器异常
     * @return 结果
     */
    @Override
    public int updateSensorAnomaly(SensorAnomaly sensorAnomaly)
    {
        return sensorAnomalyMapper.updateSensorAnomaly(sensorAnomaly);
    }

    /**
     * 批量删除传感器异常
     * 
     * @param ids 需要删除的传感器异常主键
     * @return 结果
     */
    @Override
    public int deleteSensorAnomalyByIds(Integer[] ids)
    {
        return sensorAnomalyMapper.deleteSensorAnomalyByIds(ids);
    }

    /**
     * 删除传感器异常信息
     * 
     * @param id 传感器异常主键
     * @return 结果
     */
    @Override
    public int deleteSensorAnomalyById(Integer id)
    {
        return sensorAnomalyMapper.deleteSensorAnomalyById(id);
    }
}
